# _*_ coding:utf-8 _*_
__author__ = 'joker_wb'
__date__ = '2018/3/17 23:46'
import xadmin
from .models import CityDict,CourseOrg,Teacher

class CityAdmin(object):
    list_display=['name','desc','add_time']
    search_fields=['name','desc']
    list_filter=['name','desc','add_time']

class CourseOrgAdmin(object):
    list_display = ['name', 'desc', 'click_nums',
                    'fav_nums',
                    'image',
                    'address',
                    'city',
                    'add_time']
    search_fields =['name', 'desc', 'click_nums',
                    'fav_nums',
                    'image',
                    'address',
                    'city',
                    ]
    list_filter = ['name', 'desc', 'click_nums',
                    'fav_nums',
                    'image',
                    'address',
                    'city',
                    'add_time']

class TeacherAdmin(object):
    list_display=['org',
                  'name',
                  'work_years',
                  'work_company',
                  'points',
                  'click_nums',
                  'fav_nums',
                  'add_time'
                  ]
    search_fileds=['org',
                  'name',
                  'work_years',
                  'work_company',
                  'points',
                  'click_nums',
                  'fav_nums',
                  ]
    list_filter=['org',
                  'name',
                  'work_years',
                  'work_company',
                  'points',
                  'click_nums',
                  'fav_nums',
                  'add_time'
                  ]

xadmin.site.register(CityDict,CityAdmin)
xadmin.site.register(CourseOrg,CourseOrgAdmin)
xadmin.site.register(Teacher,TeacherAdmin)
